﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HRM.DAL.DAO;
using HRM.DAL.Gateway;

namespace HRM.BLL
{
    public class StatusManager
    {
        StatusGateway gateway=new StatusGateway();
        public bool SaveStatus(Status status)
        {
            if(gateway.HasThisStatusExist(status))
            {
                return false;
            }
            else
            {
                return gateway.SaveStatus(status);
            }
        }
        public bool EditStatus(int Id, string status)
        {
            return gateway.EditStatus(Id, status);
        }
        public bool DeleteStatus(int Id)
        {
            return gateway.DeleteStatus(Id);
        }
        public List<Status> GetAllStatus()
        {
            return gateway.GetAllStatus();
        } 
    }
}